<extend name="Public:base" />
<!-- 网站标题 -->
<block name="title">数据字典添加</block>
<block name="appendheader">
	<!-- Validform_v5.3.2验证框架 -->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Validform/css/Validform_v5.3.2.css"/>
	<script type="text/javascript" src="__PUBLIC__/Validform/js/Validform_v5.3.2_min.js"></script>
	<script type="text/javascript">
		$(function() {
			$("#WebMenu-1000").addClass('active');	//选中父菜单
			$("#WebMenu-1001").addClass('active');	//选中当前菜单
		});
		$(function() {
			var editor;
			var myform=$("#myform").Validform({
				tiptype:3,
				label:".label",
				showAllError:true,
				postonce:true,//开启二次提交防御
				ajaxPost:false,
				beforeSubmit:function(curform) {
					//在验证成功后，表单提交前执行的函数，curform参数是当前表单对象。
					lockScreen();
				},
				callback:function(data){
					$.Hidemsg();
				}
			});
			myform.addRule([{
				ele:"#table_name",
				datatype:"*1-20",
				nullmsg:"请输入表名称！"
			},
			{
				ele:"#field_name",
				datatype:"*1-20",
				nullmsg:"请输入字段名称！"
			},
			{
				ele:"#field_value",
				datatype:"*1-20",
				nullmsg:"请输入字段值！"
			},
			{
				ele:"#field_mean",
				datatype:"*1-20",
				nullmsg:"请输入字段含义！"
			},
			{
				ele:"#seq",
				datatype:"n",
				nullmsg:"请输入序号！"
			}
			]);
		});
	</script>
</block>
<!-- 当前位置 -->
<block name="breadcrumb">
	<div class="page-header pull-left">
		<div class="page-title">数据字典添加</div>
	</div>
	<ol class="breadcrumb page-breadcrumb pull-left">
		<li><i class="fa fa-home"></i>&nbsp;<a href="__APP__?g=Admin">首页</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li><a href="#">系统设置</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li><a href="__APP__?g=Admin&m=FieldDict&a=index">数据字典</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li class="active">数据字典添加</li>
	</ol>
</block>
<!-- 网页主内容区 -->
<block name="main_content">
	<div class="row">
		<div class="col-lg-12">
			<div class="panel panel-blue">
				<div class="panel-heading">数据字典添加</div>
				<div class="panel-body pan">
					<form id="myform" action="__APP__?g=Admin&m=FieldDict&a=insert" method="post" class="form-horizontal form-seperated">
						<div class="form-body">
							<div class="form-group">
								<label for="inputAddress" class="col-md-2 control-label">数据表名称 <span class="require">*</span> </label>
								<div class="col-md-7">
									<div class="input-icon right">
										<input class="form-control" id="table_name" name="table_name" type="text" value="{$table_name}" readonly />
									</div>
								</div>
							</div>
							<div class="form-group">
								<label for="inputAddress" class="col-md-2 control-label">字段名称 <span class="require">*</span> </label>
								<div class="col-md-7">
									<div class="input-icon right">
										<input class="form-control" id="field_name" name="field_name" type="text" value="{$field_name}" readonly />
									</div>
								</div>
							</div>
							<div class="form-group">
								<label for="inputAddress" class="col-md-2 control-label">字段值 <span class="require">*</span> </label>
								<div class="col-md-7">
									<div class="input-icon right">
										<input class="form-control" id="field_value" name="field_value" type="text">
									</div>
								</div>
							</div>
							<div class="form-group">
								<label for="inputAddress" class="col-md-2 control-label">字段含义 <span class="require">*</span> </label>
								<div class="col-md-7">
									<div class="input-icon right">
										<input class="form-control" id="field_mean" name="field_mean" type="text">
									</div>
								</div>
							</div>
							<div class="form-group">
								<label for="type" class="col-md-2 control-label">字段类型</label>
								<div class="col-md-7">
									<select id="type" name="type" class="form-control">
										<volist name="type_list" id="vo">
											<option value="{$vo.id}">{$vo.name}</option>
										</volist>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label for="inputAddress" class="col-md-2 control-label">序号<span class="require">*</span> </label>
								<div class="col-md-7">
									<div class="input-icon right">
										<input class="form-control" id="seq" name="seq" type="text">
									</div>
								</div>
							</div>
							<div class="form-group mbn">
								<label for="inputContent" class="col-md-2 control-label">备 注</label>
								<div class="col-md-7">
									<textarea id="inputContent" rows="4" name="remark" class="form-control"></textarea>
								</div>
							</div>
							<div class="form-group mbn">
								<label for="inputContent" class="col-md-2 control-label">状态</label>
								<div class="col-md-7">
									<volist name="status_list" id="vo">
										<label class="radio-inline"><input type="radio" name="status" value="{$vo.id}" <eq name="i" value="1">checked</eq> />&nbsp;{$vo.name}</label>
									</volist>
								</div>
							</div>
						</div>
						<div class="form-actions text-left">
							<div class="col-md-offset-2 col-md-7">
								<button type="submit" class="btn btn-primary">提交</button>
								&nbsp;&nbsp;
								<button type="button" class="btn btn-green" onclick="history.go(-1);">取消</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</block>
